<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<fieldset>
	<legend>
		<strong>Bank Information</strong>
	</legend>
	<div id="content_main">
		<form:form id="form" name="form_bank" method="post"
			action="/ChitFund/user/saveBank.htm">
			<table>
				<tr>
					<td><input type="hidden" name="bankId" value="${bank.bankId}" /></td>
				</tr>
				<tr>
					<td><form:label path="bankCode">bankCode</form:label></td>
					<td><form:input path="bankCode" value="${bank.bankCode}" /></td>
				</tr>
				<tr>
					<td><form:label path="bankName">bankName</form:label></td>
					<td><form:input path="bankName" value="${bank.bankName}" /></td>
				</tr>
				<tr>
					<td><form:label path="address">Address</form:label></td>
					<td><form:input path="address" value="${bank.address}" /></td>
				</tr>
				<tr>
					<td><form:label path="phoneNo">Phone No.</form:label></td>
					<td><form:input path="phoneNo" value="${bank.phoneNo}" /></td>
				</tr>


			</table>
			<div class="form-btn">
				<input type="submit" name="Save" id="Save" value="Save"
					class="btn btn-large" /> <input type="reset" name="Clear"
					id="Clear" value="Reset" class="btn btn-large" />

			</div>
		</form:form>
	</div>
	<div class="span11">

		<h3>banks</h3>

		<c:if test="${!empty bankList}">
			<table id="tblData"
				class="table table-bordered table-striped table-hover">
				<thead>
					<tr>
						<th>bankCode</th>
						<th>bankName</th>
						<th>address</th>
						<th>phoneNo</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>

					<c:forEach items="${bankList}" var="bank">
						<tr>
							<td>${bank.bankCode}</td>
							<td>${bank.bankName}</td>
							<td>${bank.address}</td>
							<td>${bank.phoneNo}</td>
							<td><a href="/ChitFund/deleteBank.htm?id=${bank.bankId}">delete</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</c:if>

		<c:if test="${empty bankList }">
			<c:out value="No bank">
			</c:out>
		</c:if>
	</div>
</fieldset>